# backend/schemas/wireguard.py
from pydantic import BaseModel
from typing import List, Optional


class WireGuardConfigBase(BaseModel):
    server_public_key: str
    server_endpoint: str
    subnet: str
    dns_servers: Optional[List[str]] = None


class WireGuardConfigCreate(WireGuardConfigBase):
    pass


class WireGuardConfigOut(WireGuardConfigBase):
    client_public_key: str
    client_ip: str

    class Config:
        from_attributes = True


class ClientConfigResponse(BaseModel):
    config_content: str
    filename: str
    client_ip: str